package com.springweb.unit5.dao.impl;

import org.springframework.stereotype.Repository;

import com.springweb.unit5.dao.SpitterRepository;
import com.springweb.unit5.domain.Spitter;
@Repository("spitterRepository")
public class SpitterRepositoryImpl implements SpitterRepository {

	@Override
	public void save(Spitter spitter) {
		
	}

	@Override
	public Spitter findByUserName(String userName) {
		return this.getByUserName(userName);
	}
	
	public Spitter getByUserName(String userName) {
		Spitter result = new Spitter();
		result.setUserName(userName);
		result.setFirstName("FirstName");
		result.setLastName("LastName");
		result.setPassword("******");
		return result;
	}

}
